package com.itheima.d1_num1;

public class FruitUtil {
    private RedFujiApple apple;
    private double weight;


    public static double calculateApplePrice(RedFujiApple apple,double weight){
        //计算红富士苹果总价
        double price = 0;
        price = apple.getPrice() * weight;
        return price;
    }
    //通用水果价格计算
    public static double calculateFruitPrice(Fruit fruit,double weight){
        double price = 0;
        price = fruit.getPrice() * weight;
        return price;
    }
}
